import com.example.OrderService;
import com.example.UserService;

public class Main {
    public static void main(String[] args) {
        // 创建MiniApplicationContext并加载beans.xml
        MiniApplicationContext context = new MiniApplicationContext("beans.xml");

        // 获取Bean实例
        UserService userService = (UserService) context.getBean("userService");
        OrderService orderService = (OrderService) context.getBean("orderService");

        // 使用Bean
        System.out.println("User name: " + userService.getName());
        System.out.println("Order number: " + orderService.getOrderNumber());
    }
}

